-- GENERATED SPELL FOR [Halof the Deathbringer] --


function spell0_30989(pUnit, Event) --@Blood Boil,Self--
pUnit:FullCastSpellOnTarget(49941,pUnit)
pUnit:RegisterEvent('Sorts_30989', 680, 1)
end

function spell1_30989(pUnit, Event) --@Blood Strike,n/a--
pUnit:FullCastSpellOnTarget(49930,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30989', 633, 1)
end

function spell2_30989(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(49895,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30989', 528, 1)
end

function spell3_30989(pUnit, Event) --@Icy Touch,n/a--
pUnit:FullCastSpellOnTarget(49909,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30989', 658, 1)
end

function spell4_30989(pUnit, Event) --@Obliterate,n/a--
pUnit:FullCastSpellOnTarget(51425,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30989', 672, 1)
end

function Sorts_30989(pUnit, Event)
local choix_sorts_30989 = math.random(0, 4)
if choix_sorts_30989 == 0 then
pUnit:RegisterEvent('spell0_30989', 1, 1)
end
if choix_sorts_30989 == 1 then
pUnit:RegisterEvent('spell1_30989', 1, 1)
end
if choix_sorts_30989 == 2 then
pUnit:RegisterEvent('spell2_30989', 1, 1)
end
if choix_sorts_30989 == 3 then
pUnit:RegisterEvent('spell3_30989', 1, 1)
end
if choix_sorts_30989 == 4 then
pUnit:RegisterEvent('spell4_30989', 1, 1)
end
end

function mob30989_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30989', math.random(1500, 3000), 1)
end

function mob30989_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30989_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30989_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30989, 1, 'mob30989_Action')
RegisterUnitEvent(30989, 2, 'mob30989_Leave')
RegisterUnitEvent(30989, 3, 'mob30989_Kill')
RegisterUnitEvent(30989, 4, 'mob30989_Die')
